package com.ruoyi.project.data.technical.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.data.technical.mapper.TechnicalCaseLibraryMapper;
import com.ruoyi.project.data.technical.domain.TechnicalCaseLibrary;
import com.ruoyi.project.data.technical.service.ITechnicalCaseLibraryService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 技术案例库Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-27
 */
@Service
public class TechnicalCaseLibraryServiceImpl implements ITechnicalCaseLibraryService 
{
    @Autowired
    private TechnicalCaseLibraryMapper technicalCaseLibraryMapper;

    /**
     * 查询技术案例库
     * 
     * @param id 技术案例库主键
     * @return 技术案例库
     */
    @Override
    public TechnicalCaseLibrary selectTechnicalCaseLibraryById(Long id)
    {
        return technicalCaseLibraryMapper.selectTechnicalCaseLibraryById(id);
    }

    /**
     * 查询技术案例库列表
     * 
     * @param technicalCaseLibrary 技术案例库
     * @return 技术案例库
     */
    @Override
    public List<TechnicalCaseLibrary> selectTechnicalCaseLibraryList(TechnicalCaseLibrary technicalCaseLibrary)
    {
        return technicalCaseLibraryMapper.selectTechnicalCaseLibraryList(technicalCaseLibrary);
    }

    /**
     * 新增技术案例库
     * 
     * @param technicalCaseLibrary 技术案例库
     * @return 结果
     */
    @Override
    public int insertTechnicalCaseLibrary(TechnicalCaseLibrary technicalCaseLibrary)
    {
        return technicalCaseLibraryMapper.insertTechnicalCaseLibrary(technicalCaseLibrary);
    }

    /**
     * 修改技术案例库
     * 
     * @param technicalCaseLibrary 技术案例库
     * @return 结果
     */
    @Override
    public int updateTechnicalCaseLibrary(TechnicalCaseLibrary technicalCaseLibrary)
    {
        return technicalCaseLibraryMapper.updateTechnicalCaseLibrary(technicalCaseLibrary);
    }

    /**
     * 批量删除技术案例库
     * 
     * @param ids 需要删除的技术案例库主键
     * @return 结果
     */
    @Override
    public int deleteTechnicalCaseLibraryByIds(String ids)
    {
        return technicalCaseLibraryMapper.deleteTechnicalCaseLibraryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除技术案例库信息
     * 
     * @param id 技术案例库主键
     * @return 结果
     */
    @Override
    public int deleteTechnicalCaseLibraryById(Long id)
    {
        return technicalCaseLibraryMapper.deleteTechnicalCaseLibraryById(id);
    }
}
